#include "head.h"
int main()
{
	Client* client = Client::get_instance();
	(*client)();
	return 0;
}
/*string sql = "select * from friend";
	string host_name = "192.168.3.184";
	string port = "3306";
	string user_name = "root";
	string user_password = "123";
	MysqlManager* mysql_manager = MysqlManager::get_instance(host_name, port, user_name, user_password);
	Statement* stmt = mysql_manager->get_statement();
	stmt->execute("use learn");
	mysql_manager->get_qurey_result(sql);
	mysql_manager->traverse_result_set();*/
	/*string sql = "select * from friend";
		try
		{
			sql::mysql::MySQL_Driver* driver;
			sql::Connection* con;
			sql::Statement* stmt;
			sql::ResultSet* res;
			driver = sql::mysql::get_mysql_driver_instance();
			con = driver->connect("tcp://192.168.3.184:3306", "root", "123");
			stmt = con->createStatement();
			stmt->execute("use learn");
			res = stmt->executeQuery(sql);
			while (res->next())
			{
				int id = res->getInt("id");
				string phoneNumber = res->getString("phoneNumber");
				string name = res->getString("name");
				string address = res->getString("address");
				cout << "id:" << id << ",phone:" << phoneNumber << ",name:" << name << ",address:" << address << endl;
			}
			cout << "database connect successed!" << endl;
			delete stmt;
			delete con;
		}
		catch (sql::SQLException& sqle)
		{
			cout << "database connect error!" << endl;
		}*/